
next  = function()
{

	var pageIndex = parseInt(document.getElementById("pageIndex").innerHTML)

	pageIndex = pageIndex + 1

	if (pageIndex>parseInt(document.getElementById("pageNum").innerHTML))
		alert('已经是最后一页了')
	else
  		window.location.href='/?pageIndex=' + pageIndex 

}

previous  = function()
{

	var pageIndex = parseInt(document.getElementById("pageIndex").innerHTML)
	pageIndex = pageIndex - 1

	if (pageIndex==0)
		alert('已经是第一页了')
	else
  		window.location.href='/?pageIndex=' + pageIndex 

}


goto  = function()
{

	var gotoPage = parseInt(document.getElementById("gotoPage").value)
	
	if (gotoPage>0&&gotoPage<=parseInt(document.getElementById("pageNum").innerHTML))
		window.location.href='/?pageIndex=' + gotoPage 
	else
  		alert('错误的参数')

}